ALMaSS  1.0
The Animal, Landscape and Man Simulation System
Hunter Class Reference

The base class for hunters encompsassing all their general behaviours. More...

#include <Hunters_all.h>

Inheritance diagram for Hunter:
TAnimal TALMaSSObject GooseHunter

Public Member Functions

 Hunter (struct_Hunter *p_data, Hunter_Population_Manager *p_PPM)
 The constructor for the Hunter class. More...
 
virtual ~Hunter ()
 The destructor for the Hunter class. More...
 
int GetHuntingDays ()
 Gets the annual hunting attempts count. More...
 
int GetBag ()
 Gets the annual hunting bag. More...
 
int GetShots ()
 Gets the number of shots this season to-date. More...
 
virtual void ResetBag ()
 Sets the annual hunting bag to zero. More...
 
void ResetHuntingOpportunities ()
 Sets the annual hunting attempts count to zero. More...
 
int GetClock ()
 Supplies the clock time. More...
 
void ResetClock ()
 Sets the clock back to zero. More...
 
void ResetSeasonData ()
 Sets the bag and hunting counters to zero. More...
 
bool IsOutHunting ()
 A debug function, but may be useful in other contexts. Returns true of currently out hunting. More...
 
void OnMorning ()
 Optimism in the morning, perhaps we should hunt? More...
 
int GetRef ()
 Provide our ref name. More...
 
APoint GetHome ()
 Provide our home coords. More...
 
int GetHuntField ()
 Get the polygon reference number to our current hunting field (which is at a hunting location) More...
 
APoint GetHuntLoc (unsigned a_ref)
 Provide our hunting location coords. More...
 
FarmGetFarmerRef (unsigned a_ref)
 Provide our ref name. More...
 
virtual bool InSeason (int)
 Is it hunting season? - MUST be overridden in descendent class. More...
 
virtual bool IsSeasonEnd (int)
 Is it the end of the hunting season? - MUST be overridden in descendent class. More...
 
virtual int GetSeasonLengthLeft (int)
 Returns the length of the hunting season in days - MUST be overridden in descendent class. More...
 
virtual void SaveMyData (ofstream *)
 Each hunter needs to save different kinds of data, so we use a polymorphic method for this. More...
 
virtual void OnShoot ()
 On shoot message handler - must be overidden in descendent classes. More...
 
virtual void OnGoHome ()
 On gohome message handler - must be overidden in descendent classes. More...
 
- Public Member Functions inherited from TAnimal
unsigned SupplyFarmOwnerRef ()
 
AnimalPosition SupplyPosition ()
 
APoint SupplyPoint ()
 
int SupplyPolygonRef ()
 
int Supply_m_Location_x ()
 
int Supply_m_Location_y ()
 
virtual void KillThis ()
 
virtual void CopyMyself ()
 
void SetX (int a_x)
 
void SetY (int a_y)
 
 TAnimal (int x, int y, Landscape *L)
 
virtual void BeginStep (void)
 BeingStep behaviour - must be implemented in descendent classes. More...
 
virtual void Step (void)
 Step behaviour - must be implemented in descendent classes. More...
 
virtual void EndStep (void)
 EndStep behaviour - must be implemented in descendent classes. More...
 
virtual void ReinitialiseObject (int x, int y, Landscape *L)
 Used to re-use an object - must be implemented in descendent classes. More...
 
virtual int WhatState ()
 
virtual void Dying ()
 
void CheckManagement (void)
 
void CheckManagementXY (int x, int y)
 
virtual bool OnFarmEvent (FarmToDo)
 
- Public Member Functions inherited from TALMaSSObject
int GetCurrentStateNo ()
 Returns the current state number. More...
 
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
 
bool GetStepDone ()
 Returns the step done indicator flag. More...
 
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
 
virtual void ReinitialiseObject ()
 Used to re-use an object - must be implemented in descendent classes. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()
 The destructor for TALMaSSObject. More...
 
void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 

Protected Member Functions

virtual TypeOfHunterState st_ShouldGoHunting (void)
 Decide whether to go out hunting on a specific day. More...
 
TypeOfHunterState st_OutHunting (void)
 The basic hunting behaviour. More...
 
TypeOfHunterState st_Resting (void)
 Finished hunting and waiting for the next opportunity. More...
 
virtual void Init (struct_Hunter *p_data)
 Initiation of a basic hunter here. More...
 
bool IsTodayAPreferredHuntDay (int a_today)
 Checks for the hunting day preference (weekday or any day) More...
 
bool IsTodayAChosenHuntDay (int a_today)
 Uses a probability test to determine whether to go hunting today. More...
 
virtual int CheckForGame (void)
 If the hunter checks for game at their hunting locations then this is done here. Must be overridden. More...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Protected Attributes

int m_myname
 A reference number unique to this hunter. More...
 
TypeOfHunterState m_CurrentHState
 The current hunter behavioural state. More...
 
Hunter_Population_Managerm_OurPopulationManager
 Pointer to the population manager. More...
 
int m_clock
 Records the time spent hunting per day. More...
 
int m_bag
 The numbers of game items shot todate this year. More...
 
int m_myShots
 The numbers of shots to-date this year. More...
 
int m_myMagazine
 The number of shells in the magazine. More...
 
int m_huntingdays
 The numbers of days used for hunting this year. More...
 
int m_lasthuntday
 The date for the last hunt day. More...
 
int m_baglimit
 Annual self-imposed limit on number shot - unused at present. More...
 
int m_huntlimit
 Annual self-imposed limit on number of days spent hunting. More...
 
double m_efficiency
 Probability of 'hitting' a game item. More...
 
double m_goosecountchance
 Probability of checking for geese in hunting area. More...
 
int m_weekend
 Code for weekly hunting activity. More...
 
vector< Farm * > m_OurFarmers
 List of pointers to the farmers whose land the hunter hunts
More...
 
APoint m_Home
 
int m_huntfield_polyref
 The polygon reference number to our current hunting field (which is at a hunting location) More...
 
int m_NoHuntLocs
 
vector< int > m_HuntLocRefs
 
vector< APointm_HuntLocs
 
- Protected Attributes inherited from TAnimal
int m_Location_x
 
int m_Location_y
 
Landscapem_OurLandscape
 
- Protected Attributes inherited from TALMaSSObject
int m_CurrentStateNo
 The basic state number for all objects - '-1' indicates death. More...
 
bool m_StepDone
 Indicates whether the iterative step code is done for this timestep. More...
 

Detailed Description

The base class for hunters encompsassing all their general behaviours.

The hunter class specifies general hunter behaviours that are common to all hunter types.

Constructor & Destructor Documentation

◆ Hunter()

Hunter::Hunter ( struct_Hunter p_data,
Hunter_Population_Manager p_PPM 
)

The constructor for the Hunter class.

1075  : TAnimal(p_data->m_home.m_x, p_data->m_home.m_y, p_data->m_L)
1076 {
1077  m_OurPopulationManager = p_PPM;
1078  Init(p_data);
1079 }
int m_y
Definition: ALMaSS_Setup.h:56
int m_x
Definition: ALMaSS_Setup.h:55
Hunter_Population_Manager * m_OurPopulationManager
Pointer to the population manager.
Definition: Hunters_all.h:129
virtual void Init(struct_Hunter *p_data)
Initiation of a basic hunter here.
Definition: Hunters_all.cpp:1086
TAnimal(int x, int y, Landscape *L)
Definition: PopulationManager.cpp:1367
Landscape * m_L
Definition: Hunters_all.h:94
APoint m_home
Definition: Hunters_all.h:84

References Init(), and m_OurPopulationManager.

◆ ~Hunter()

Hunter::~Hunter ( )
virtual

The destructor for the Hunter class.

1082 {
1083  ;
1084 }

Member Function Documentation

◆ CheckForGame()

virtual int Hunter::CheckForGame ( void  )
inlineprotectedvirtual

If the hunter checks for game at their hunting locations then this is done here. Must be overridden.

Reimplemented in GooseHunter.

179  {
180  return false;
181  }

◆ GetBag()

int Hunter::GetBag ( )
inline

Gets the annual hunting bag.

193  {
194  return m_bag;
195  }
int m_bag
The numbers of game items shot todate this year.
Definition: Hunters_all.h:133

References m_bag.

Referenced by GooseHunter::SaveMyData().

◆ GetClock()

int Hunter::GetClock ( )
inline

Supplies the clock time.

210  {
211  return m_clock;
212  }
int m_clock
Records the time spent hunting per day.
Definition: Hunters_all.h:131

References m_clock.

Referenced by Hunter_Population_Manager::DoFirst().

◆ GetFarmerRef()

Farm* Hunter::GetFarmerRef ( unsigned  a_ref)
inline

Provide our ref name.

240 { return m_OurFarmers[a_ref]; }
vector< Farm * > m_OurFarmers
List of pointers to the farmers whose land the hunter hunts
Definition: Hunters_all.h:153

References m_OurFarmers.

◆ GetHome()

APoint Hunter::GetHome ( )
inline

Provide our home coords.

232 { return m_Home; }
APoint m_Home
Definition: Hunters_all.h:155

References m_Home.

◆ GetHuntField()

int Hunter::GetHuntField ( )
inline

Get the polygon reference number to our current hunting field (which is at a hunting location)

234  {
235  return m_huntfield_polyref;
236  }
int m_huntfield_polyref
The polygon reference number to our current hunting field (which is at a hunting location)
Definition: Hunters_all.h:157

References m_huntfield_polyref.

Referenced by Hunter_Population_Manager::DoFirst().

◆ GetHuntingDays()

int Hunter::GetHuntingDays ( )
inline

Gets the annual hunting attempts count.

189  {
190  return m_huntingdays;
191  }
int m_huntingdays
The numbers of days used for hunting this year.
Definition: Hunters_all.h:139

References m_huntingdays.

Referenced by GooseHunter::SaveMyData().

◆ GetHuntLoc()

APoint Hunter::GetHuntLoc ( unsigned  a_ref)
inline

Provide our hunting location coords.

238 { return m_HuntLocs[a_ref]; }
vector< APoint > m_HuntLocs
Definition: Hunters_all.h:163

References m_HuntLocs.

◆ GetRef()

int Hunter::GetRef ( )
inline

Provide our ref name.

230 { return m_myname; }
int m_myname
A reference number unique to this hunter.
Definition: Hunters_all.h:125

References m_myname.

◆ GetSeasonLengthLeft()

virtual int Hunter::GetSeasonLengthLeft ( int  )
inlinevirtual

Returns the length of the hunting season in days - MUST be overridden in descendent class.

Reimplemented in GooseHunter.

250  {
251  return 0;
252  }

Referenced by IsTodayAChosenHuntDay().

◆ GetShots()

int Hunter::GetShots ( )
inline

Gets the number of shots this season to-date.

197  {
198  return m_myShots;
199  }
int m_myShots
The numbers of shots to-date this year.
Definition: Hunters_all.h:135

References m_myShots.

Referenced by GooseHunter::SaveMyData().

◆ Init()

void Hunter::Init ( struct_Hunter p_data)
protectedvirtual

Initiation of a basic hunter here.

1087 {
1088  m_Home = p_data->m_home;
1089  m_HuntLocs = p_data->m_huntlocs;
1090  m_HuntLocRefs = p_data->m_huntlocrefs;
1091  m_NoHuntLocs = int( m_HuntLocs.size() );
1093  m_bag = 0;
1094  m_myShots = 0;
1095  m_huntingdays = 0;
1096  m_baglimit = 999999999; // p_data->m_baglimit;
1097  m_huntlimit = p_data->m_huntingdayslimit;
1099  m_efficiency = p_data->m_efficiency;
1100  m_OurFarmers = p_data->m_farms;
1101  m_weekend = p_data->m_weekend;
1102  m_myname = p_data->m_ref;
1103  m_clock = 0;
1104  m_lasthuntday = 0;
1106  //m_AnnualHuntingAttempts = 0;
1107 }
static CfgInt cfg_hunter_magazinecapacity("HUNTER_MAGAZINECAPACITY", CFG_CUSTOM, 2)
The number of shots a hunter can take per shooting event.
@ tohts_InitialState
Definition: Hunters_all.h:57
int value(void)
Definition: configurator.h:98
int m_baglimit
Annual self-imposed limit on number shot - unused at present.
Definition: Hunters_all.h:143
vector< int > m_HuntLocRefs
Definition: Hunters_all.h:161
int m_weekend
Code for weekly hunting activity.
Definition: Hunters_all.h:151
double m_goosecountchance
Probability of checking for geese in hunting area.
Definition: Hunters_all.h:149
TypeOfHunterState m_CurrentHState
The current hunter behavioural state.
Definition: Hunters_all.h:127
int m_lasthuntday
The date for the last hunt day.
Definition: Hunters_all.h:141
double m_efficiency
Probability of 'hitting' a game item.
Definition: Hunters_all.h:147
int m_myMagazine
The number of shells in the magazine.
Definition: Hunters_all.h:137
int m_huntlimit
Annual self-imposed limit on number of days spent hunting.
Definition: Hunters_all.h:145
int m_NoHuntLocs
Definition: Hunters_all.h:159
double m_goosecountchance
Definition: Hunters_all.h:93
double m_efficiency
Definition: Hunters_all.h:92
int m_ref
Definition: Hunters_all.h:82
int m_huntingdayslimit
Definition: Hunters_all.h:90
vector< int > m_huntlocrefs
Definition: Hunters_all.h:85
vector< APoint > m_huntlocs
Definition: Hunters_all.h:86
int m_weekend
Definition: Hunters_all.h:91
vector< Farm * > m_farms
Definition: Hunters_all.h:89

References cfg_hunter_magazinecapacity, m_bag, m_baglimit, m_clock, m_CurrentHState, struct_Hunter::m_efficiency, m_efficiency, struct_Hunter::m_farms, struct_Hunter::m_goosecountchance, m_goosecountchance, struct_Hunter::m_home, m_Home, m_huntingdays, struct_Hunter::m_huntingdayslimit, m_huntlimit, struct_Hunter::m_huntlocrefs, m_HuntLocRefs, struct_Hunter::m_huntlocs, m_HuntLocs, m_lasthuntday, m_myMagazine, m_myname, m_myShots, m_NoHuntLocs, m_OurFarmers, struct_Hunter::m_ref, struct_Hunter::m_weekend, m_weekend, tohts_InitialState, and CfgInt::value().

Referenced by Hunter().

◆ InSeason()

virtual bool Hunter::InSeason ( int  )
inlinevirtual

Is it hunting season? - MUST be overridden in descendent class.

Reimplemented in GooseHunter.

242  {
243  return false;
244  }

Referenced by st_ShouldGoHunting().

◆ IsOutHunting()

bool Hunter::IsOutHunting ( )
inline

A debug function, but may be useful in other contexts. Returns true of currently out hunting.

223  {
224  if (m_CurrentHState == tohts_OutHunting) return true;
225  return false;
226  }
@ tohts_OutHunting
Definition: Hunters_all.h:59

References m_CurrentHState, and tohts_OutHunting.

Referenced by Hunter_Population_Manager::DoFirst().

◆ IsSeasonEnd()

virtual bool Hunter::IsSeasonEnd ( int  )
inlinevirtual

Is it the end of the hunting season? - MUST be overridden in descendent class.

Reimplemented in GooseHunter.

246  {
247  return true;
248  }

Referenced by Hunter_Population_Manager::DoFirst().

◆ IsTodayAChosenHuntDay()

bool Hunter::IsTodayAChosenHuntDay ( int  a_today)
inlineprotected

Uses a probability test to determine whether to go hunting today.

Parameters
[in]a_todayThe day in the year
Returns
true = go hunting today, or false = don't go hunting today

Calculates the season length left, then divides the number of hunting days still needed by this to get a probability of going each day. This probability is scaled to hedge our bets for going earlier in the season. Then a probability test is taken and the value returned as true = go today, or false = don't go To calculate this we need the remaining season length. Then if a weekend hunter this is multiplied by 2/7 to get weekends. We assume that we will hedge our bets to some extent, so the probability is based on scaler*daysneeded/dayspossible e.g. if scaler is 2 and we need 2 days and 10 are left, the chance of going is 2*2/10 per day = 40%.

1158  {
1170  double seasonleft = double( GetSeasonLengthLeft( a_today ) );
1171  if (m_weekend == 0) seasonleft *= 2.0 / 7.0;
1172  double prob = cfg_hunterhuntdayprobscaler.value()*(m_huntlimit - m_huntingdays) / seasonleft;
1173  if (g_rand_uni() < prob) return true;
1174  return false;
1175 }
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
static CfgFloat cfg_hunterhuntdayprobscaler("HUNTER_HUNTDAYPROBSCALER", CFG_CUSTOM, 2.0)
Hedging bets scaler to the probability of going hunting on a particular day.
double value(void)
Definition: configurator.h:118
virtual int GetSeasonLengthLeft(int)
Returns the length of the hunting season in days - MUST be overridden in descendent class.
Definition: Hunters_all.h:250

References cfg_hunterhuntdayprobscaler, g_rand_uni, GetSeasonLengthLeft(), m_huntingdays, m_huntlimit, m_weekend, and CfgFloat::value().

Referenced by st_ShouldGoHunting().

◆ IsTodayAPreferredHuntDay()

bool Hunter::IsTodayAPreferredHuntDay ( int  a_today)
inlineprotected

Checks for the hunting day preference (weekday or any day)

Parameters
[in]a_todayThe day in the year
Returns
true = go hunting today, or false = don't go hunting today

Checks whether today is a weekend, if so and weekend hunter then hunt chance today, if not no chance. Otherwise if not a weekend hunter all is good to hunt.

1137  {
1145  if (m_weekend == 0) // 0 means only hunt at weekend
1146  {
1147  // 5 & 6 are assumed to be weekends
1148  if (a_today % 7 > 4) return true; else return false;
1149  }
1150  if (m_weekend == 2) // 2 means leave cfg_hunterrefractionperiod days between hunts
1151  {
1152 
1153  if (m_OurLandscape->SupplyGlobalDate() - m_lasthuntday >= cfg_hunterrefractionperiod.value()) return true; else return false;
1154  }
1155  return true;
1156 }
static CfgInt cfg_hunterrefractionperiod("HUNTER_REFRACTIONPERIOD", CFG_CUSTOM, 7)
The number of days rest between going hunting.
long SupplyGlobalDate(void)
Definition: landscape.h:1621
Landscape * m_OurLandscape
Definition: PopulationManager.h:229

References cfg_hunterrefractionperiod, m_lasthuntday, TAnimal::m_OurLandscape, m_weekend, Landscape::SupplyGlobalDate(), and CfgInt::value().

Referenced by st_ShouldGoHunting().

◆ OnGoHome()

virtual void Hunter::OnGoHome ( )
inlinevirtual

On gohome message handler - must be overidden in descendent classes.

Reimplemented in GooseHunter.

260 { ; }

◆ OnMorning()

void Hunter::OnMorning ( )
inline

Optimism in the morning, perhaps we should hunt?

@ tohts_Hunting
Definition: Hunters_all.h:58

References m_CurrentHState, and tohts_Hunting.

Referenced by Hunter_Population_Manager::DoFirst().

◆ OnShoot()

virtual void Hunter::OnShoot ( )
inlinevirtual

On shoot message handler - must be overidden in descendent classes.

Reimplemented in GooseHunter.

258 { ; }

◆ ResetBag()

virtual void Hunter::ResetBag ( )
inlinevirtual

Sets the annual hunting bag to zero.

Reimplemented in GooseHunter.

201  {
202  m_bag = 0;
203  m_myShots = 0;
204  }

References m_bag, and m_myShots.

Referenced by GooseHunter::ResetBag(), and ResetSeasonData().

◆ ResetClock()

void Hunter::ResetClock ( )
inline

Sets the clock back to zero.

214  {
215  m_clock = 0;
216  }

References m_clock.

Referenced by Hunter_Population_Manager::DoFirst(), and GooseHunter::Init().

◆ ResetHuntingOpportunities()

void Hunter::ResetHuntingOpportunities ( )
inline

Sets the annual hunting attempts count to zero.

206  {
207  m_huntingdays = 0;
208  }

References m_huntingdays.

Referenced by ResetSeasonData().

◆ ResetSeasonData()

void Hunter::ResetSeasonData ( )
inline

Sets the bag and hunting counters to zero.

218  {
219  ResetBag();
221  }
virtual void ResetBag()
Sets the annual hunting bag to zero.
Definition: Hunters_all.h:201
void ResetHuntingOpportunities()
Sets the annual hunting attempts count to zero.
Definition: Hunters_all.h:206

References ResetBag(), and ResetHuntingOpportunities().

Referenced by Hunter_Population_Manager::DoFirst(), and GooseHunter::Init().

◆ SaveMyData()

virtual void Hunter::SaveMyData ( ofstream *  )
inlinevirtual

Each hunter needs to save different kinds of data, so we use a polymorphic method for this.

Reimplemented in GooseHunter.

254  {
255  ; // Base class does nothing
256  }

Referenced by Hunter_Population_Manager::DoFirst().

◆ st_OutHunting()

TypeOfHunterState Hunter::st_OutHunting ( void  )
protected

The basic hunting behaviour.

Must not be called, has to be overridden in descendent classes.

1178 {
1182  return tohts_foobar;
1183 }
@ tohts_foobar
Definition: Hunters_all.h:61

References tohts_foobar.

◆ st_Resting()

TypeOfHunterState Hunter::st_Resting ( void  )
protected

Finished hunting and waiting for the next opportunity.

Just stays doing this until called out again by the population manager

1186 {
1190  return tohts_Resting;
1191 }
@ tohts_Resting
Definition: Hunters_all.h:60

References tohts_Resting.

Referenced by GooseHunter::Step().

◆ st_ShouldGoHunting()

TypeOfHunterState Hunter::st_ShouldGoHunting ( void  )
protectedvirtual

Decide whether to go out hunting on a specific day.

This is called at the beginning of each day, if it is decided to go hunting then this is done for each 10 minute period. First check we have not shot our limit this year or done our allocated number of days, if so do nothing.

Otherwise we want to find out if we should hunt today - this depends on the season for our game species, and whether we want to hunt today - which depends on whether it is a weekend or not - and then how eager we are.

We've established that it is legal to hunt today but whether the hunter goes depends on how eager he is. This is determined by a probability that is based on the number of days needed to fulfil the hunting day limit, and the number of possible days left in the season. This will also depend on whether they are a weekend hunter or not, and finally whether he checks if there are geese on his hunting locations (done in st_OutHunting ).

When all the days are used up, the hunter will no longer enter this decision process.

Reimplemented in GooseHunter.

1110 {
1115  if ((m_bag >= m_baglimit) || (m_huntingdays >= m_huntlimit)) return tohts_Resting;
1119  int day = m_OurLandscape->SupplyDayInYear();
1120  if (!InSeason( day )) return tohts_Resting;
1121  // is it a weekday?
1129  if (IsTodayAPreferredHuntDay(day)) {
1130  if (IsTodayAChosenHuntDay( day )) {
1131  return tohts_OutHunting;
1132  }
1133  }
1134  return tohts_Resting; // This is important that it returns resting and not hunting - resting stops the hunter doing anything until the next day.
1135 }
bool IsTodayAPreferredHuntDay(int a_today)
Checks for the hunting day preference (weekday or any day)
Definition: Hunters_all.cpp:1137
bool IsTodayAChosenHuntDay(int a_today)
Uses a probability test to determine whether to go hunting today.
Definition: Hunters_all.cpp:1158
virtual bool InSeason(int)
Is it hunting season? - MUST be overridden in descendent class.
Definition: Hunters_all.h:242
int SupplyDayInYear(void)
Definition: landscape.h:1596

References InSeason(), IsTodayAChosenHuntDay(), IsTodayAPreferredHuntDay(), m_bag, m_baglimit, m_huntingdays, m_huntlimit, TAnimal::m_OurLandscape, Landscape::SupplyDayInYear(), tohts_OutHunting, and tohts_Resting.

Referenced by GooseHunter::st_ShouldGoHunting().

Member Data Documentation

◆ m_bag

int Hunter::m_bag
protected

The numbers of game items shot todate this year.

Referenced by GetBag(), Init(), GooseHunter::OnShotABird(), ResetBag(), and st_ShouldGoHunting().

◆ m_baglimit

int Hunter::m_baglimit
protected

Annual self-imposed limit on number shot - unused at present.

Referenced by Init(), and st_ShouldGoHunting().

◆ m_clock

int Hunter::m_clock
protected

Records the time spent hunting per day.

Referenced by GetClock(), Init(), ResetClock(), and GooseHunter::st_OutHunting().

◆ m_CurrentHState

TypeOfHunterState Hunter::m_CurrentHState
protected

The current hunter behavioural state.

Referenced by Init(), IsOutHunting(), GooseHunter::OnGoHome(), OnMorning(), and GooseHunter::Step().

◆ m_efficiency

double Hunter::m_efficiency
protected

Probability of 'hitting' a game item.

Referenced by Init(), GooseHunter::OnShoot(), and GooseHunter::st_OutHunting().

◆ m_goosecountchance

double Hunter::m_goosecountchance
protected

Probability of checking for geese in hunting area.

Referenced by GooseHunter::CheckForGame(), and Init().

◆ m_Home

APoint Hunter::m_Home
protected

/brief The home location for the hunter

Referenced by GetHome(), and Init().

◆ m_huntfield_polyref

int Hunter::m_huntfield_polyref
protected

The polygon reference number to our current hunting field (which is at a hunting location)

Referenced by GetHuntField(), GooseHunter::OnGoHome(), GooseHunter::OnShoot(), and GooseHunter::st_OutHunting().

◆ m_huntingdays

int Hunter::m_huntingdays
protected

◆ m_huntlimit

int Hunter::m_huntlimit
protected

Annual self-imposed limit on number of days spent hunting.

Referenced by Init(), IsTodayAChosenHuntDay(), and st_ShouldGoHunting().

◆ m_HuntLocRefs

vector<int> Hunter::m_HuntLocRefs
protected

\ The hunting location ref numbers

Referenced by Init().

◆ m_HuntLocs

vector<APoint> Hunter::m_HuntLocs
protected

\ The hunting locations centroid of the farm held in m_OurFarmer

Referenced by GetHuntLoc(), and Init().

◆ m_lasthuntday

int Hunter::m_lasthuntday
protected

The date for the last hunt day.

Referenced by Init(), IsTodayAPreferredHuntDay(), and GooseHunter::st_OutHunting().

◆ m_myMagazine

int Hunter::m_myMagazine
protected

The number of shells in the magazine.

Referenced by Init(), and GooseHunter::st_OutHunting().

◆ m_myname

int Hunter::m_myname
protected

A reference number unique to this hunter.

Referenced by GetRef(), Init(), GooseHunter::OnShotABird(), and GooseHunter::SaveMyData().

◆ m_myShots

int Hunter::m_myShots
protected

The numbers of shots to-date this year.

Referenced by GetShots(), Init(), GooseHunter::OnShoot(), ResetBag(), and GooseHunter::st_OutHunting().

◆ m_NoHuntLocs

int Hunter::m_NoHuntLocs
protected

/brief The number of farms he can hunt on

Referenced by GooseHunter::Init(), and Init().

◆ m_OurFarmers

vector<Farm*> Hunter::m_OurFarmers
protected

List of pointers to the farmers whose land the hunter hunts

Referenced by GetFarmerRef(), GooseHunter::GooseHunter(), GooseHunter::Init(), and Init().

◆ m_OurPopulationManager

◆ m_weekend

int Hunter::m_weekend
protected

Code for weekly hunting activity.

Referenced by Init(), IsTodayAChosenHuntDay(), and IsTodayAPreferredHuntDay().


The documentation for this class was generated from the following files: